﻿using System.Drawing;
using System.Windows.Forms;

namespace PlusPlusPaint.Tools
{
    class ObjectRemovalTool : ISketchTool
    {
        #region properties
        public bool DemandsNewLayer
        {
            get
            {
                return false;
            }
        }

        public bool AcceptsNewLayer
        {
            get
            {
                return false;
            }
        }

        public bool Done
        {
            get
            {
                return true;
            }
        }

        public Image Preview
        {
            get;
            set;
        }

        public Color Colour
        {
            get;
            set;
        }

        public int BrushSize
        {
            get;
            set;
        }
        #endregion

        #region overrides
        public bool AcceptableLayer(Layers.ILayer l)
        {
            return true;
        }

        public Layers.ILayer SuggestNewLayer()
        {
            return null;
        }

        public void GiveAccessToLayer(Layers.CompositeLayer l, Point p)
        {
            l.Delete();
        }

        public void GiveAccessToLayer(Layers.VisualObjectLayer l, Point p)
        {
            l.Delete();
        }

        // The tool does not react to further input
        public void HandleMouseDown(MouseEventArgs mea) { }
        public void HandleMouseDrag(MouseEventArgs mea) { }
        public void HandleMouseUp(MouseEventArgs mea) { }
        public void HandleKeyPressed(KeyPressEventArgs kpea) { }
        #endregion
    }
}
